package com.pansoft.openplanet.constant;

import android.content.Context;
import android.os.Environment;

import com.efounder.constant.EnvironmentVariable;

import java.io.File;

import static com.efounder.frame.utils.Constants.KEY_SETTING_APPID;

/**
 * Created by YQS on 2018/3/24.
 */

public class TalkChainConstant {

    /**
     * keystore路径（测试用）
     */
    public static final String TEST_PATH = Environment.getExternalStorageDirectory()
            .getAbsolutePath()
            + File.separator
            + EnvironmentVariable.getProperty(KEY_SETTING_APPID) + "/keystore";

    /**
     * 获取主账号keystore存储目录
     *
     * @param context
     * @return
     */
    public static String getDataFilePath(Context context) {
        //example data/data/come.efounder.liveapp/file
        String path = context.getFilesDir().getAbsolutePath()
                + File.separator
                + "/keystore";
        return path;
    }

    /**
     * 获取子账户keystore的存储目录
     *
     * @param context
     * @return
     */
    public static String getChildAccountFilePath(Context context) {
        String path = context.getFilesDir().getAbsolutePath()
                + File.separator
                + "/keystore/child";
        return path;
    }
}
